package com.kobeliu.controller;


import com.kobeliu.pojo.Stu;
import com.kobeliu.result.IMOOCJSONResult;
import com.kobeliu.service.StuService;
import com.kobeliu.utils.SMSUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author kobeliu
 * @since 2024-07-19
 */
@RestController
@RequestMapping("/stu")
@Slf4j
public class StuController {

    @Autowired
    private StuService stuService;

    @Value("${server.port}")
    private String port;

    @Autowired
    private SMSUtils smsUtils;

    @RequestMapping(method = RequestMethod.GET,path = "/hello")
    public String hello(){

        log.info("======================================");
        log.info("当前服务器所用的端口为：{}",port);
        log.info("======================================");

        return "当前服务器端口为："+port;
    }

    @RequestMapping(method = RequestMethod.GET,path = "/send-sms")
    public String sendSMS(){

        log.info("======================================");
        log.info("当前服务器所用的端口为：{}",port);
        log.info("======================================");

        return "当前服务器端口为："+port;
    }

}

